﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Solution.Business.Entities;

namespace Solution.Data
{
    public class TransactionDAC
    {
        SolutionEntities context = SolutionEntities.Context;
        public List<Transaction> Transaction_GetByTop(string Top, string Where, string Ord)
        {
            var list = context.Transaction_GetByTop(Top, Where, Ord);
            return list.ToList();
        }

        public void Transaction_Insert(Transaction transaction)
        {
            context.Transaction_Insert(transaction.Name, transaction.TrGroup, transaction.TrGroup2, transaction.Level);
        }

        public void Transaction_Update(Transaction Transaction)
        {
            context.Transaction_Update(Transaction.TrId, Transaction.Name, Transaction.TrGroup, Transaction.TrGroup2, Transaction.Level);
        }
    }
}
